﻿using System;

namespace Columbus
{
    /// <summary>
    /// Exception is thrown when navigation request can not be serialized for saving in navigation journal
    /// </summary>
    public class NavigationRequestSerializationException : Exception
    {
        /// <summary>
        /// Initializes a new instance of the <see cref="NavigationRequestSerializationException"/> class.
        /// </summary>
        /// <param name="innerException">Inner exception.</param>
        public NavigationRequestSerializationException(Exception innerException)
            : base("Navigation request can not be serialized. Navigation request must either be serializable (class must be decorated with [DataContract] attribute and serializable members must be decorated with [DataMember] attribute) or alternatively if navigation request is not serializable then it can not be saved in navigation history and action result must requre not saving navigation request (use NoNeedToSaveRequestInJournal method on action result). Also see inner exception for more details.", innerException)
        {
        }
    }
}